package com.jxj.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jxj.dao.OrgMapper;
import com.jxj.entity.OrganizationInfoVO;
import com.jxj.entity.Resp;
import com.jxj.entity.gen.TOrganizationMsg;
import com.jxj.service.OrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author Cambria
 * @creat 2021/9/6 15:06
 */
@Service
public class OrganizationServiceImpl extends ServiceImpl<OrgMapper , TOrganizationMsg> implements OrganizationService {

    @Autowired
    OrgMapper orgMapper;

    @Override
    public ArrayList<OrganizationInfoVO> selectOrgByClass12(String c1, String c2) {

        List<TOrganizationMsg> msgs = orgMapper.selectOrgByClass12(c1, c2);

        ArrayList<OrganizationInfoVO> vo = new ArrayList<>();
        for (TOrganizationMsg msg : msgs) {
            vo.add(new OrganizationInfoVO(msg));
        }
        return vo;
    }
}
